<?php
ob_start();
session_cache_expire(999999999);
if (!isset($_SESSION)) {
    session_start();
}
$lang = $_SESSION['lang'];
if ($lang == '')
    $lang = 'EN';
if (!isset($_REQUEST['page'])) {
    $page = 1;
} else {
    $page = $_REQUEST['page'];
}
if($_SESSION['role']!=2){
	echo $_SESSION['role'];
	header("Location: ../index.php");
}
$rows_per_page = $_SESSION['rows_page'];
$page_start = ( $page - 1 ) * $rows_per_page;
$page_end = $page * $rows_per_page;

include("operations/get_lang.php");
$value = getlang();
include($value);

include 'operations/connection.php';

$content = "content/list-library-content.php";
if (isset($_REQUEST['content'])) {

    $content = "content/" . $_REQUEST['content'] . ".php";
}

if (isset($_REQUEST['action']))
    $action = $_REQUEST['action'];
if (isset($_REQUEST['id']))
    $id = $_REQUEST['id'];

if (isset($_REQUEST['type'])) {
    $type = $_REQUEST['type'];

    if ($type == 7)
        $content = 'content/view-form7-content.php';
    else if ($type == 12)
        $content = 'content/view-form12-content.php';
    else if ($type == 13)
        $content = 'content/view-form13-content.php';
    else if ($type == 15)
        $content = 'content/view-form15-content.php';
    else if ($type == 14)
        $content = 'content/view-form14-content.php';
    else if ($type == 16)
        $content = 'content/view-form16-content.php';
    else if ($type == 17)
        $content = 'content/view-form17-content.php';
    else if ($type == 11)
        $content = 'content/view-form11-content.php';
    else if ($type == 18)
        $content = 'content/view-form18-content.php';
    else if ($type == 19)
        $content = 'content/view-form19-content.php';
}


if (!isset($_SESSION['user'])) {
    header('Location: login.php?timeout=on');
} else {
    $username = $_SESSION['fullname'];
    $id_employee = $_SESSION['IDEmployee'];
}
echo $_SESSION['back'];

$title = $_SESSION['browser'];





require("MainTemplate.php");
ob_flush();
?>